package com.genius.reservation.guardPerson.controller;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.io.unit.DataUnit;
import com.alibaba.fastjson.JSONObject;
import com.genius.reservation.common.GlobalExceptionHandler.GlobalException;
import com.genius.reservation.common.ResponseRule;
import com.genius.reservation.driver.service.IDriverInformationService;
import com.genius.reservation.guardPerson.service.IGuardPersonInformationService;
import com.genius.reservation.tools.annotation.webLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 * 警卫人员表 前端控制器
 * </p>
 *
 * @author baomidou
 * @since 2022-05-26
 */
@RestController
@RequestMapping("/reservation/guard")
@Api(tags = "警卫人员控制器",value = "警卫控制器")
public class GuardPersonInformationController {

    @Autowired
    IGuardPersonInformationService guardService;

    //到达确认  查看是否早到或迟到  早到就等待  迟到就发信息给主管  重新分配月台
//    @PostMapping("/arrive")
//    @ApiOperation("到达确认")
//    ResponseRule arrive(@RequestParam String reservationNumber){
//        return guardService.arrive(reservationNumber);
//    }

    @PostMapping("/findCar")
    @webLog
    @ApiOperation("根据车牌号寻找车辆")
    ResponseRule findCar (@RequestBody JSONObject body)
    {
        String carCode = body.getString("carCode");
        return guardService.findCar(carCode);
    }
    //获取车辆信息

    //获取月台信息 判断是否需要等待  放行或退回  发送信息给主管





}
